<%@ Control Language="C#" AutoEventWireup="true" CodeFile="AddYCode.ascx.cs" Inherits="forums_controls_administration_AddYCode" %>
<p>
YCode Tag:<br />
<asp:TextBox ID="txtTag" runat="server" MaxLength="10"></asp:TextBox>
    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtTag"
        ErrorMessage="Need a Tag" ValidationGroup="AddYCode"></asp:RequiredFieldValidator></p>
<p>
    Number of Arguments:<br />
    <asp:TextBox ID="txtArguments" runat="server" MaxLength="2" Width="55px" Text="0"></asp:TextBox>
    <asp:CompareValidator ID="CompareValidator1" runat="server" ControlToValidate="txtArguments"
        ErrorMessage="Needs to be an integer" Operator="DataTypeCheck" Type="Integer"
        ValidationGroup="AddYCode"></asp:CompareValidator></p>
<p>
    <asp:CheckBox runat="server" ID="chkNesting" Checked="true" Text="Allow Nested Tags?" />
</p>
<p>
HTML Template:
    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtTemplate"
        ErrorMessage="Need a template" ValidationGroup="AddYCode"></asp:RequiredFieldValidator><br />
    <asp:TextBox ID="txtTemplate" runat="server" Height="186px" TextMode="MultiLine"
        Width="600px"></asp:TextBox><br />
   </p>
   <ul>
        <li>{text} inserts the text between a tag in to template.</li>
        <li>{arg<i>n</i>} inserts the <i>nth</i> argument captured in a tag into the template.</li>
        <li>{text:url} and {arg<i>n</i>:url} will insert captured text or argument only if they are
        a valid URL.</li>
        <li>
            <p>
            Sample tag:<br />
            Tag: URL<br />
            Number of Arguments: 1<br />
            Allow Nesting: False<br />
            Template: &lt;a href="{arg1:url}" target="_blank"&gt;{text}&lt;/a&gt;
            </p>
            <p>
                Captures: <code>[url=http://www.google.com]Google![/url]</code><br/>
                Renders: <code>&lt;a href="http://www.google.com" target="_blank"&gt;Google!&lt;/a&gt;</code>
            </p>
        </li>
   </ul>
<p>
    <asp:Button ID="btnCreate" runat="server" OnClick="btnCreate_Click" Text="Create!"
        ValidationGroup="AddYCode" />&nbsp;</p>
